import { http } from '@/utils/http/axios';

const prefix = '/admin/hosp/hospitalSet';
/**
 * @description 分页获取医院设置信息
 */
export function getHospSetPageList(params) {
  return http.request({
    url: `${prefix}/query`,
    method: 'GET',
    params
  })
}

/**
 * @description 删除医院设置信息
 */
export function deleteHospSet(id) {
  return http.request({
    url: `${prefix}/${id}`,
    method: 'DELETE'
  })
}

/**
 * @description 批量删除医院设置信息
 */
export function batchRemoveHospSet(ids) {
  return http.request({
    url: `${prefix}/batchRemove`,
    method: 'DELETE',
    data: ids
  })
}

/**
 * @description 锁定和取消锁定医院设置信息
 */
export function lockHospSet(id, status) {
  return http.request({
    url: `${prefix}/lock/${id}/${status}`,
    method: 'PUT'
  })
}

/**
 * @description 添加医院设置信息
 */
export function saveHospSet(hospitalSet) {
  return http.request({
    url: `${prefix}/save`,
    method: 'POST',
    data: hospitalSet
  })
}

/**
 * @description 更新医院设置信息
 */
export function updateHospSet(hospitalSet) {
  return http.request({
    url: `${prefix}/update`,
    method: 'POST',
    data: hospitalSet
  })
}